package Test01;


import java.util.LinkedList;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 28463
 * Date: 2022—07—02
 * Time: 9:49
 */
public class Demo01 {
    public static void main(String[] args) {
        //底层是一个双向链表。不是单链表
        LinkedList<Integer> list = new LinkedList<>();

        MyLinkedList myLinkedList = new MyLinkedList();
        myLinkedList.addFirst(1);
        myLinkedList.addFirst(2);
        myLinkedList.addFirst(2);
        myLinkedList.addFirst(4);

        myLinkedList.display();
        System.out.println("=================");
        myLinkedList.removeAllKey(2);
        myLinkedList.display();
        System.out.println("==============");
        myLinkedList.clear();
        myLinkedList.display();


    }
}
